package com.aaa.doctor.controller.api;

import com.aaa.doctor.service.SchedulingService;
import com.aaa.doctor.vo.Scheduling2Vo;
import com.aaa.doctor.vo.Scheduling3Vo;
import com.aaa.doctor.vo.SchedulingVo;
import com.aaa.entity.Scheduling;
import com.aaa.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author MuChengGuo
 * @date 2023/3/28 9:02
 * Description: 排班表
 **/
@Api(tags = "前端 - 排班信息")
@RestController
@RequestMapping("/doctor/api/scheduling")
public class SchedulingApiController {

    @Autowired
    private SchedulingService schedulingService;

    @PostMapping("queryScheduling")
    @ApiOperation(value = "查询所有排班信息")
    public Result queryScheduling(@ApiParam(value = "条件") @RequestBody SchedulingVo schedulingVo) {
        return schedulingService.queryScheduling(schedulingVo);
    }

    @PostMapping("queryMyScheduling")
    @ApiOperation(value = "查询登录者的排班信息")
    public Result queryMyScheduling(@ApiParam(value = "条件") @RequestBody SchedulingVo schedulingVo) {
        return schedulingService.queryMyScheduling(schedulingVo);
    }

    @PostMapping("modification")
    @ApiOperation(value = "修改排班信息")
    public Result modification(@ApiParam(value = "条件") @RequestBody Scheduling2Vo scheduling2Vo) {
        return schedulingService.modification(scheduling2Vo);
    }

    @PostMapping("listDeptForScheduling")
    @ApiOperation(value = "门诊挂号")
    public Result<List<Scheduling>> listDeptForScheduling(@ApiParam(value = "条件") @RequestBody Scheduling3Vo scheduling3Vo) {
        return schedulingService.listDeptForScheduling(scheduling3Vo);
    }


}
